home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Info-Mac 4
/
Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso
/
Development
/
General
/
CIncludesTool
/
¡¡¡ Read Me !!!
Wrap
Text File
|
1994-02-27
|
4KB
|
80 lines
Read-Me file for CIncludes tools and scripts.
This archive contains some MPW and ToolServer scripts and tools that are useful
for finding C function definitions, etc. in your standard header files.
Two versions are included. The original was obtained from CompuServe a number
of years ago. It was very useful, but had some limitations (no provision for
switching from the header files and definitions for one compiler to another,
the include files were expected to all be in a single folder, etc.)
I modified the original tool (slightly) and script (much more extensively) to
deal with these issues. There is an environment variable defined {CIncludesCompiler}
which defines which compiler is currently in use, and therefore what search path
should be used when locating header files. The included scripts have support for
the Apple C and C++ compilers, the Symantec MPW compilers, and the Metrowerks CodeWarrior
compilers. The first two come with a standard set of scripts which define environment
variables for normal and MacApp header files. These same environment variables are used
by my scripts. Since the Metrowerks compilers aren't MPW tools, they don't come with any
scripts. I have supplied two scripts (UserStartup•MW and UserStartupTS•MW) to define
comparable environment variables. These scripts should be edited to reflect the correct
file path to the headers on your drive.
Please read the file "Instructions" which accompanies the original version of the
scripts and tool for information on what services are provided. The following notes
are not intended to be exhaustive or complete.
Included are scripts for using the CIncludesCode tool with BBEdit, ObjectMaster, and
Metrowerks CodeWarrior. These editors use different commands to support opening files
from within ToolServer, so the supporting scripts have been modified appropriately.
In the MPW shell, the main script is named CIncludesTool. In BBEdit it's called
BBEdit•CIncludesTool. For ObjectMaster, it's OMCincludesTool. For CodeWarrior, it's
MWCIncludesTool.
After installing the scripts and tools (making any modifications to search paths, etc.
required by your system), the first step is to generate the data files (1 per compiler)
used by the tools and scripts. In MPW the command:
CIncludesTool -m
will generate the file (which can be very time consuming). Note that if this is performed
using ToolServer (in ObjectMaster, BBEdit, Metrowerks, etc.) there is very little feedback
about the status of the operation. Be patient: it takes a long time to parse 100+ header
files. The data file is automatically put in the preferences folder within the system folder.
Once the data file has been made, the other 3 functions can be tried. The commands are:
CIncludesTool -i
when this is invoked via menu, with selected #include <headername.h> text,
the selected #includes are reformatted to remove redundancies
CIncludesTool -f
when this is invoked via menu, with selected text, a line of the form:
#include <headername.h>
is added to the file's current list of #includes, where headername.h is the
file which contains the definition of the selected text. Note that the command
doesn't check for duplicates, so <headername.h> may already be present
CIncludesTool -d
when this is invoked via menu, with selected text, the header file containing
the definition of the selected text is opened, with the definition selected.
The MPW Shell supports all 3 operations, as it has a flexible, scriptable Find command.
Under BBEdit, ObjectMaster, and Metrowerks, only the last two are available. Also,
rather than adding the #include <headername.h> for the CIncludesTool -f command
(which can't easily be done owing to limited scripting ability), either an alert with the
name of the header file is displayed, or the #include <headername.h> is written to the
worksheet. Also, only ObjectMaster supports getting the current selection, so the BBEdit
and Metrowerks scripts have been modified to take an extra parameter (the definition to
be searched for).
••••••••••••••••••••••••••
IMPORTANT. The source code and scripts are copyrighted by the original author, who released
them for non-profit use by individuals. I attach no additional restrictions to my
modifications, and I accept no responsibility or liability for your use of any of the
enclosed files.
Brian Clark
b-clark@nwu.edu